<template>
   <view class="category">
    <ugo-search></ugo-search>
    <view class="main">

      <view class="left">
        <view
          class="item"
          :class="current===index?'active':''"
          v-for="(item,index) in leftTitles"
          :key="item"
          @click="changeItem(index)"
        >{{item}}</view>
      </view>
      <view class="right">
        <view
          class="goods-group"
          v-for="item in goods"
          :key="item.cat_id"
        >
          <!-- 标题 -->
          <view class="goods-group-title">{{item.cat_name}}</view>
          <!-- 内容 -->
          <view class="goods-group-list">
            <view
              class="goods-item"
              v-for="item2 in item.children"
              :key="item2.cat_id"
            >
              <u-image
                :src="item2.cat_icon"
                width="120"
                height="120"
              ></u-image>
              <view class="cat_name">{{item2.cat_name}}</view>
            </view>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {

}
</script>

<style>

</style>